package 
{
	import flash.display.Sprite;
	import flash.events.Event;
	[SWF(width = "1024",height = "650",frameRate = "24",backgroundColor = "#ffffff")]
	/**
	 * ...
	 * @author 
	 */
	public class Main extends Sprite 
	{
		public var model:Model;
		public var view:View;
		public var control:Control;
		
		public function Main():void 
		{
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event = null):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			// entry point·
			 model = Model.GetInstance();
			 view = View.GetInstance();
			 control = Control.GetInstance();
			 
			 this.addChild(view.viewStage);
			 control.restAll();
		}
		
	}
	
}